//
//  UILabel+Init.m
//  UI22_项目框架
//
//  Created by 15 on 15/7/3.
//  Copyright (c) 2015年 dllo. All rights reserved.
//

#import "UILabel+Init.h"

@implementation UILabel (Init)

+(instancetype)labelWithFrame:(CGRect)frame text:(NSString *)text backgroundColor:(UIColor *)bgColor textColor:(UIColor *)tColor alignment:(NSTextAlignment)alignment
{
    UILabel *lbl = [[[UILabel alloc] initWithFrame:frame] autorelease];
    lbl.text = text;
    if (bgColor) {
        lbl.backgroundColor = bgColor;
    }
    if (tColor) {
        lbl.textColor = tColor;
    }
    lbl.textAlignment = alignment;
    return lbl;
}

@end
